#doc---------------------------------------------------------
#所有参数 显示格式为NBT路径(NBT路径以宏参数内的item为根目录)
#String | item: 原版物品ID　##必选
#String | skill: DAB技能ID　##必选
#String | item_modifier: 生成时应用的物品修饰器
#doc---------------------------------------------------------

$data modify storage dab:register parser.get_skill_item set value $(item)

#必选检查
execute unless data storage dab:register parser.get_skill_item.item run return run function dab:system/register/.fail/custom_tip {tip:'{"text":"获取失败,缺少item或skill","color":"red"}'}
execute unless data storage dab:register parser.get_skill_item.skill run return run function dab:system/register/.fail/custom_tip {tip:'{"text":"获取失败,缺少item或skill","color":"red"}'}

#格式检查
execute if data storage dab:register parser.get_skill_item.item run function dab:system/register/format_check {type:"string",path:"from storage dab:register parser.get_skill_item.item"}
execute if data storage dab:register parser.get_skill_item.skill run function dab:system/register/format_check {type:"string",path:"from storage dab:register parser.get_skill_item.skill"}
execute if data storage dab:register parser.get_skill_item.item_modifier run function dab:system/register/format_check {type:"string",path:"from storage dab:register parser.get_skill_item.item_modifier"}

function dab:system/register/skill/summon_skill_item with storage dab:register parser.get_skill_item

data remove storage dab:register parser.get_skill_item